package dm1101.demo01;

/**
 * @author Ln
 * @version 终极版
 * @date 2022/11/1 14:41
 */
public class TestJoin {
    public static void main(String[] args) {
        Join join = new Join();
        Join join1 =new Join();
        join.start();
        join1.start();

        try {
            join.join();
            join1.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }

        for (int i = 0; i < 10; i++) {
            System.out.println("main++++"+i);
        }

    }
}
class Join extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 10; i++) {
            System.out.println(Thread.currentThread().getName()+"======"+i);
        }
    }
}
